package com.zjz.demo;

public class Proxy implements Rent{

    private Host host;

    public Proxy() {
    }

    // 代理的关键--引入被代理人
    public Proxy(Host host){
        this.host=host;
    }


    public void rent(){
        host.rent();
        seeHouse();
        free();
    }


    // 看房

    public void seeHouse(){
        System.out.println("中介带你看房！");
    }

    public void free(){
        System.out.println("手中介费：");
    }


}
